home *** CD-ROM | disk | FTP | other *** search
/ Popular Request / By Popular Request (Arsenal Computer)(SysOptics Distribution System).ISO / amiga1 / dlgtn121.lha / source / localset.c < prev    next >
C/C++ Source or Header  |  1993-04-06  |  403b  |  22 lines

  1. /*
  2.     LocalSet - set local environment vars from a DLG menu script
  3.  
  4.   We can't use set within a DLG menu script because it's a built in 
  5.   command - use this instead.
  6.  
  7. */
  8. #include <dos/var.h>
  9.  
  10. main(argc,argv)
  11. char *argv[];
  12. {
  13.     if (argc == 3) 
  14.     {    SetVar((char *)argv[1],(char *)argv[2],strlen(argv[2])+1,GVF_LOCAL_ONLY);
  15.         exit(0);
  16.     } else if (argc == 1)
  17.     {    Execute("Set",0L,0L);
  18.         exit(0);
  19.     }
  20.     exit(10);
  21. }
  22.